import React from "react";

/** 弹窗显示 */
export default function useVisible(v = false) {

    const [visible, setVisible] = React.useState(v);

    const onClose = React.useCallback(() => { setVisible(false) }, [])

    const onOpen = React.useCallback(() => { setVisible(true) }, [])

    return { visible, onClose, onOpen }
}